{include file=member.header.html}
<style>
#header .shopnav{ display:none}
</style>
<script>
$(function(){
	$('.J_OrderDetail').click(function(){
		$(this).find('em').toggleClass('arrow-down');
		$('#depopay-order-detail').toggle();
	})
	$('.J_PayMethod').click(function(){
		if($(this).attr('checked')==true) {
			$('.J_PayMethod').each(function(index, element) {
                $(this).attr('checked', false);
            });
			$(this).attr('checked', true);
			$('.J_SelectedBank').find('input[type="radio"]').each(function(index, element) {
                $(this).attr('disabled',false);
            });
			$('.J_SelectedBank').find('input[type="radio"]:first').attr('checked', true);
		}
		else
		{
			$('.J_SelectedBank').find('input[type="radio"]').each(function(index, element) {
				$(this).attr('checked', false);
                $(this).attr('disabled',true);
            });
		}
	});
	
	$('.J_Password').change(function(){
		$('.J_PasswordNotice').hide();
		$('.J_PasswordNotice p').removeClass('correct-nobg').addClass('yellow');
	});
	
	$('#depayform').validate({
        errorPlacement: function(error, element){
			$('#depayform').find('.J_PasswordNotice').html('<p class="yellow">'+error.text()+'</p>');
            $('#depayform').find('.J_PasswordNotice').show();
        },
        success       : function(label){
            $('#depayform').find('.J_PasswordNotice').html('<p class="correct-nobg">&nbsp;</p>');
			return true;
        },
        onkeyup : false,
        rules : {
            password : {
				remote   : {
                    url : 'index.php?app=deposit&act=check_deposit_password_ajax',
                    type: 'get',
                    data:{
                        password : function(){
                            return $.trim($('.J_Password').val());
                        }
                    }
                }
            }
        },
        messages : {
            password  : {
				remote   : '{$lang.password_error}'
            }
        }
    });

	$('#depayform').submit(function(){
		if($('.J_PayMethod:checked').length > 0){
			if($('.J_SelectedBank').find('input[type="radio"]:checked').length==0){
				alert('{$lang.pls_select_bank}');
				return false;
			}
		}
	});

});



</script>
<div id="mycart" class="w auto">
   <div class="step step1000 step3 mt10 clearfix">
      <span class="fs14 strong f60">{$lang.ckgwc}</span>
      <span class="fs14 strong f60">{$lang.qrddxx}</span>
      <span class="fs14 strong fff">{$lang.fk}</span>
      <span class="fs14 strong">{$lang.qrsh}</span>
      <span class="fs14 strong">{$lang.pj}</span>
   </div>
</div>
<div class="depopay">
	<div class="paynotice">{$paynotice} <a href="{$site_url}" target="_blank">[?]</a></div>
    	<div class="content">
			<div class="order-info">
    			<div class="order-base">
        			<div class="explain">
                    	<span></span>
            			<p>您正在使用担保交易付款</p>
                		
            		</div>
           			<div class="goods-message clearfix">
            			<h3 class="float-left">{$order_info.first_goods_name}</h3>
                		<span class="float-left">卖家店铺：{$order_info.seller_name}</span>
            		</div>
           			<div class="payAmount">
            			<strong>{$order_info.order_amount}</strong> 元
                		<a href="javascript:window.location.reload();" class="f60">刷新</a>
           			</div>
        		</div>
        		<div class="order-detail hidden" id="depopay-order-detail">
        			<dl class="clearfix">
        				<dt>订单编号：</dt>
            			<dd>{$order_info.order_sn}</dd>
        			</dl>
       			<dl class="clearfix">
        			<dt>商品名称：</dt>
            		<dd>
            			<!--{foreach from=$order_info.ordergoods item=goods name=fe_goods}-->
            			<a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name}</a>{if !$smarty.foreach.fe_goods.last}，{/if}
                		<!--{/foreach}-->
            		</dd>
        		</dl>
        		<dl class="clearfix">
        			<dt>交易金额：</dt>
            		<dd>{$order_info.order_amount} 元</dd>
        		</dl>
        		<dl class="clearfix">
        			<dt>购买时间：</dt>
            		<dd>{$order_info.add_time|date:Y年m月d日 H:i:s}</dd>
        		</dl>
        		<dl class="clearfix">
        			<dt>收货地址：</dt>
            		<dd>{$order_info.region_name}{$order_info.address}，{$order_info.zipcode}（邮编），{$order_info.consignee}（收）{$order_info.phone_mob}</dd>
        		</dl>
        	</div>
    		<div class="detail-more J_OrderDetail">
        		<em class="arrow-down"></em>
            	<a href="javascript:;">订单详情</a>
        	</div>
    	</div>
    	<div  class="depay-form">
    	<form method="post" id="depayform">
    		<div class="account-detail">
    			<ul class="detail-line clearfix">
        			<li>{$lang.deposit_account}</span>( {$deposit_account.account} )</li>
            		<li>可支付余额：<strong class="price">{$deposit_account.money}</strong> 元</li>
        		</ul>
				<div class="notice-word mt10"><p>提示：如果订单金额较大，无法一次完成扣款，请先<a href="{url app=deposit&act=recharge}" target="_blank">充值</a>后再支付订单。</p></div>
            
				<ul class="paymethod">
                	<!--{if  ($deposit_account.money >0) && ($deposit_account.money < $order_info.order_amount)}-->
					<li class="money-not-enough">
                    	<label><input type="checkbox" class="text J_PayMethod" name="paymethod" value="BalancePay" /> 用预存款余额付款 <strong class="price f60">{$deposit_account.money}</strong> 元，
						剩余<strong class="price f60">{$order_info.surplus}</strong> 元可选择下列网上银行继续付款。</label>
                    </li>
                    <!--{/if}-->
                    <li class="use-all-netpay mt20">
                    	<label><input type="checkbox" class="text J_PayMethod" name="paymethod" value="AllNetPay" /> 不使用预存款余额，
						直接用以下付完全款 <strong class="price f60">{$order_info.order_amount}</strong> 元。</label>
                    </li>
				</ul>
    		</div>
     		<div class="netpay">
                <div class="netpay-title"><strong>选择付款方式</strong></div>
                <div class="netpay-content clearfix">
                	<div class="bank-list clearfix">
						<ul class="ui-list-icons clearfix J_SelectedBank">
                        	<input type="hidden" name="payment_code" value="alipay" />
                            <li class="clearfix">
								<input class="float-left" type="radio" name="defaultbank" id="alipay" value="alipay" disabled="disabled" />
								<label class="float-left  icon-box current " for="alipay" >
									<span class="icon-cashier icon-cashier-alipay" title="{$lang.alipay}">&nbsp;</span>
								</label>
							</li>
							<!--{foreach from=$alipaybank item=bank key=key name=fe_bank}-->
							<li class="clearfix" style="display:none"> <!--支付宝下架网银支付接口，暂时屏蔽网银选项-->
								<input class="float-left"  type="radio" name="defaultbank" id="{$key}" value="{$key}" disabled="disabled" />
								<label class="float-left icon-box current " for="{$key}" >
									<span class="icon-cashier icon-cashier-{$key}" title="{$bank}">&nbsp;<em class="qiye hidden">企业</em></span>
								</label>
							</li>
							<!--{/foreach}-->
						</ul>       
					</div>
                </div>
			</div>
			<div class="paysubmit">
				<dl class="clearfix mt20">
					<dt class="float-left">{$lang.pay_password}{$lang.colon}</dt>
					<dd class="float-left"><input type="password" class="text J_Password" name="password" /></dd>
                    <dd class="float-left notice-word hidden J_PasswordNotice"><p class="yellow"></p></dd>
                </dl>
                <dl class="clearfix">
					<dt class="float-left">&nbsp;</dt> 
					<dd class="float-left"><span class="btn-alipay"><input type="submit" value="{$lang.pay_submit}" /></span></dd>
				</dl>
			</div>       
		</form>
		</div>
    </div>
</div>
{include file="footer.html"}
